package com.yesun.task.pipeline.common;

import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.stereotype.Component;

/**
 * @Author yesun
 * @Descritpion
 * @Date 2023/8/21 19:31
 * @Version 1.0
 **/
@Component
public class SpringUtil implements ApplicationContextAware {

    public static ApplicationContext APPLICATION_CONTEXT;

    @Override
    public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
        SpringUtil.APPLICATION_CONTEXT = applicationContext;
    }
}
